import axios from '@/utils/request'
const base = '/movieserver'

export function listFreeFiles(type, params) {
  return axios({
    url: `${base}/freeFiles/${type}`,
    method: 'get',
    params
  })
}

export function deleteFreeFiles(type, id) {
  return axios({
    url: `${base}/freeFiles/${type}/${id}`,
    method: 'delete'
  })
}

/**
 * 批量删除多个空闲文件
 * @param reqs 删除空闲文件请求数组
 * @returns {Promise<unknown[]>}
 */
export function deleteMultiFreeFiles(reqs) {
  return axios.all(reqs)
}
